﻿using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;

namespace Zj.DDDSample.Repositories.EntityFrameworkCore.Migrations
{
    public partial class InitDb_02 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_User",
                schema: "dbo",
                table: "User");

            migrationBuilder.RenameTable(
                name: "User",
                schema: "dbo",
                newName: "Project");

            migrationBuilder.AddPrimaryKey(
                name: "PK_Project",
                schema: "dbo",
                table: "Project",
                column: "Id");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_Project",
                schema: "dbo",
                table: "Project");

            migrationBuilder.RenameTable(
                name: "Project",
                schema: "dbo",
                newName: "User");

            migrationBuilder.AddPrimaryKey(
                name: "PK_User",
                schema: "dbo",
                table: "User",
                column: "Id");
        }
    }
}
